//
// Decompiled by Jadx - 378ms
//
package fh;

import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.activity.b;
import androidx.recyclerview.widget.RecyclerView;
import fg.t;
import fn.y;
import gc.z;
import java.util.List;
import me.plusne.common.Json.Soul.JsonBubbleUri;
import me.plusne.common.Json.Soul.JsonSoulBubble;
import r.e;

public final class c extends RecyclerView.h<a> {
    public final List<JsonSoulBubble.DataDTO> a;

    public c(List<JsonSoulBubble.DataDTO> list) {
        this.a = list;
    }

    public final int getItemCount() {
        List<JsonSoulBubble.DataDTO> list = this.a;
        if (list == null) {
            return 0;
        }
        return list.size();
    }

    public final void onBindViewHolder(RecyclerView.ae aeVar, int i) {
        String str;
        a aVar = (a) aeVar;
        JsonSoulBubble.DataDTO dataDTO = this.a.get(i);
        aVar.getClass();
        if (dataDTO != null) {
            JsonBubbleUri jsonBubbleUri = (JsonBubbleUri) b.c(dataDTO.getExtAttributes().replace("\\", ""), JsonBubbleUri.class);
            z.dh(y.by.getActivity(), dataDTO.getCommodityUrl(), aVar.c, 10);
            aVar.b.setText(dataDTO.getCommodityName());
            TextView textView = aVar.a;
            if (jsonBubbleUri != null && jsonBubbleUri.getBubbleUri().equals(y.cf("ChatBubble", "no"))) {
                e.d(-2113535953, r1.getRound(), textView);
                str = "已装扮";
            } else {
                e.d(-2113535954, r1.getRound(), textView);
                str = "立即装扮";
            }
            textView.setText(str);
            if (jsonBubbleUri != null) {
                y.co(dataDTO.getCommodityUrl(), "ChatBubble_" + jsonBubbleUri.getBubbleUri());
                textView.setOnClickListener(new t(3, aVar, jsonBubbleUri));
            }
        }
    }

    public final RecyclerView.ae onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new a(this, LayoutInflater.from(viewGroup.getContext()).inflate(-2113142641, viewGroup, false));
    }
}
